#include"main.h"
int judge1(int studentcode);
int judge2(int selectcode);
int judge3(int selecttime);
int judge4(int selectctime);
int judge5(int selectetime);
int judge6(int selectcredit);
int judge7(int selectterm);
void selectcode2(int k);
void selectname2(int k);
void selecttype2(int k);
void selecttime2(int k);
void selectctime2(int k);
void selectetime2(int k);
void selectcredit2(int k);
void selectterm2(int k);
void Courseinsert();
void Coursebrowse();
void Coursequery();
void Studentinsert();
void Selectcode(int studentcode);
void Selectname(int studentcode);
void Selectype(int studentcode);
void Selecttime(int studentcode);
void Selectctime(int studentcode);
void Selectetime(int studentcode);
void Selectcredit(int studentcode);
void Selectterm(int studentcode);
void query(int studentcode);
void Select1();
void Select2();
void Select3();
void Studentcourse();
void Statistic1();
int Statistic2(int coursecode);
void Statistic3();
void Statistic4();
void Statistic();

int main() {   //主函数
	for (int i = 1; i; i++) {
		int n;
		printf("*************欢迎使用学生选修课程系统***************\n");
		printf("\t      ***   菜单   ***\n");
		printf("\t****   1.录入课程信息   ****\n");
		printf("\t****   2.浏览课程信息   ****\n");
		printf("\t****   3.查询课程信息   ****\n");
		printf("\t****   4.录入学生信息   ****\n");
		printf("\t****   5.学生选修课程   ****\n");
		printf("\t****   6.选修课程统计   ****\n");
		printf("\t****   7.退出系统       ****\n");
		printf("\t****   请输入你的选择!   ****\n");
		scanf("%d", &n);
		if (n < 1 || n > 7) {
			printf("输入错误");
			scanf("%d", &n);
		} else if (n >= 1 && n < 7) {
			switch (n) {
				case 1:
					Courseinsert();
					break;
				case 2:
					Coursebrowse();
					break;
				case 3:
					Coursequery();
					break;
				case 4:
					Studentinsert();
					break;
				case 5:
					Studentcourse();
					break;
				case 6:
					Statistic();
					break;
			}
		} else {
			break;
		}
	}
	return 0;
}

